package com.eascs.workflow.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.eascs.common.util.UrlUtil;
import com.eascs.site.view.ViewContext;
import com.eascs.tag.MenuTag;
import com.eascs.workflow.common.controller.BaseMasterViewController;
import com.eascs.workflow.common.entity.sys.HREmployeeAuditor;

/**
 * 人员关系维护
 * @author LMX
 *
 */
@Controller
@RequestMapping("/HREmplAuditor")
public class HREmplAuditorController extends BaseMasterViewController{
	
	public void preHandle() {
		super.preHandle();
		ViewContext.put(MenuTag.CURRENT_MENU_CODE, "HrEmployeeAuditor");
	}
	
	@RequestMapping("/index")
	public String index(HREmployeeAuditor entity){
		String o2ourl = "/rHREmplAuditor/o2o";
		if (entity != null) {
			String employeeName = entity.getEmployeeName() == null ? "" : entity.getEmployeeName();
			String auditorType = entity.getAuditorType() == null ? "" : entity.getAuditorType();
			String auditorName = entity.getAuditorName() == null ? "" : entity.getAuditorName();
			o2ourl = UrlUtil.appendUrl(o2ourl, "employeeName", employeeName);
			o2ourl = UrlUtil.appendUrl(o2ourl, "auditorType", auditorType);
			o2ourl = UrlUtil.appendUrl(o2ourl, "auditorName", auditorName);
			o2ourl = o2ourl + "&o2oIndex=";
		} else {
			o2ourl = o2ourl + "?o2oIndex=";
		}
		ViewContext.put("o2ourl", o2ourl);
		ViewContext.put("vo", entity);
		return "/user/index";
	}

}
